package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DDishCategoriesMapper;
import com.ruoyi.system.domain.DDishCategories;
import com.ruoyi.system.service.IDDishCategoriesService;

/**
 * 菜品类别Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-03
 */
@Service
public class DDishCategoriesServiceImpl implements IDDishCategoriesService 
{
    @Autowired
    private DDishCategoriesMapper dDishCategoriesMapper;

    /**
     * 查询菜品类别
     * 
     * @param id 菜品类别主键
     * @return 菜品类别
     */
    @Override
    public DDishCategories selectDDishCategoriesById(Long id)
    {
        return dDishCategoriesMapper.selectDDishCategoriesById(id);
    }

    /**
     * 查询菜品类别列表
     * 
     * @param dDishCategories 菜品类别
     * @return 菜品类别
     */
    @Override
    public List<DDishCategories> selectDDishCategoriesList(DDishCategories dDishCategories)
    {
        return dDishCategoriesMapper.selectDDishCategoriesList(dDishCategories);
    }

    /**
     * 新增菜品类别
     * 
     * @param dDishCategories 菜品类别
     * @return 结果
     */
    @Override
    public int insertDDishCategories(DDishCategories dDishCategories)
    {
        return dDishCategoriesMapper.insertDDishCategories(dDishCategories);
    }

    /**
     * 修改菜品类别
     * 
     * @param dDishCategories 菜品类别
     * @return 结果
     */
    @Override
    public int updateDDishCategories(DDishCategories dDishCategories)
    {
        return dDishCategoriesMapper.updateDDishCategories(dDishCategories);
    }

    /**
     * 批量删除菜品类别
     * 
     * @param ids 需要删除的菜品类别主键
     * @return 结果
     */
    @Override
    public int deleteDDishCategoriesByIds(Long[] ids)
    {
        return dDishCategoriesMapper.deleteDDishCategoriesByIds(ids);
    }

    /**
     * 删除菜品类别信息
     * 
     * @param id 菜品类别主键
     * @return 结果
     */
    @Override
    public int deleteDDishCategoriesById(Long id)
    {
        return dDishCategoriesMapper.deleteDDishCategoriesById(id);
    }
}
